package com.ssy.lingxi.member.merchant.api.handler.annotation;
import com.ssy.lingxi.member.merchant.api.handler.validator.MemberRightSpendTypeValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 权益消费类型校验注解
 * @author 万宁
 * @version 2.0.0
 * @date 2020-11-20
 */
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = MemberRightSpendTypeValidator.class)
public @interface MemberRightSpendTypeAnno {
    boolean required() default true;

    String message() default "权益消费类型参数值不在枚举定义范围内";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
